package mobilesearch.receiver;

import java.util.ArrayList;

import mobilesearch.data.AlarmData;
import mobilesearch.ui.OnSearchResultListener;
import android.util.Log;

public class AlarmReceiver {
	private static final String TAG = "AlarmReceiver";
	private ArrayList<AlarmData> alarmList;
	private OnSearchResultListener listener;
	
	public AlarmReceiver(ArrayList<AlarmData> audioList, OnSearchResultListener listener) {
		this.alarmList = audioList;
		this.listener = listener;
	}
	
	public void processAlarmData(){
		int size = this.alarmList.size();
		Log.i(TAG, "alarm list"+ size);
		for(int i = 0; i < size; i++){
			AlarmData data = this.alarmList.get(i);
			String time = data.getAlarmTime();
			Log.i(TAG, "time = "+time);
			String msg = data.getAlarmMsg();
			Log.i(TAG, "msg = " + msg);
			this.listener.onReceiveAlarmData(time, msg);
		}
	}


}
